package com.kaibes.admin.message;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.kaibes.web.admin.AdminMenu;
import com.kaibes.web.admin.AdminMenuRes;

@Configuration
public class MessageInit {

    public final static String KEY = "message-manage";
    
    @Bean
    public AdminMenu messageMenu() {
        AdminMenu menu = new AdminMenu();
        menu.setKey(KEY);
        menu.setName("消息模块");
        menu.setIcon("fas fa-sms");
        menu.setHref("");
        menu.setSort(1);
        menu.setParentKey(AdminMenuRes.MENU_BASE);
        return menu;
    }
    
    @Bean
    public AdminMenu messageSendMenu() {
        AdminMenu menu = new AdminMenu();
        menu.setKey("message-send");
        menu.setName("发送消息");
        menu.setIcon("fas fa-comment");
        menu.setHref("/admin/message/send");
        menu.setSort(1);
        menu.setParentKey(KEY);
        return menu;
    }
    
    @Bean
    public AdminMenu messageListMenu() {
        AdminMenu menu = new AdminMenu();
        menu.setKey("message-list");
        menu.setName("消息列表");
        menu.setIcon("fas fa-comments");
        menu.setHref("/admin/message/list");
        menu.setSort(2);
        menu.setParentKey(KEY);
        return menu;
    }
    
}
